<!--设置模块唯一ID-->
<div id="rlzy_zhaopin_zong_confirm">
<!--标题、面包屑-->
<section class="content-header">
    <h1>
        总经理审批
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
        <li>人力资源</li>
        <li>招聘</li>
        <li class="active">总经理审批</li>
    </ol>
</section>
<!--列表-->
<section class="content">

</section>
<!--添加、修改弹出层-->
<script type="text/template" data-for="tp_editor">
    <form role="form" class="form-horizontal">
        <div class="u-area">
            <div class="form-group">
                <label class="col-sm-2 control-label">编号：<%=data.p1?data.p1:''%></label>
                <div class="col-sm-4">
                    <input type="text" class="form-control"
                           value="<%=data.p1?data.p1:''%>" disabled>
                </div>

                <label class="col-sm-2 control-label">状态</label>
                <div class="col-sm-4">
                    <select class="form-control" name="p2">
                        <option>草稿</option>
                        <option>待部门经理审批</option>
                        <option>待人力资源经理审批</option>
                        <option>待总经理审批</option>
                        <option>通过</option>
                        <option>不通过</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="u-box">
            <div class="u-box-header">
                <h3>操作人信息</h3>
            </div>
            <div class="u-area">
                <div class="form-group">
                    <label class="col-sm-2 control-label">操作人</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="p3"
                               value="<%=data.p3?data.p3:''%>">
                    </div>

                    <label class="col-sm-2 control-label">当前时间</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="p4"
                               value="<%=data.p4?data.p4:''%>">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">所属部门</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="p3"
                               value="<%=data.p3?data.p3:''%>">
                    </div>

                    <label class="col-sm-2 control-label">联系方式</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="p4"
                               value="<%=data.p4?data.p4:''%>">
                    </div>
                </div>
            </div>
        </div>
        <div class="u-box">
            <div class="u-box-header">
                <h3>岗位信息</h3>
            </div>
            <div class="u-area">
                <div class="form-group">
                    <label class="col-sm-2 control-label">申请公司</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="p3"
                               value="<%=data.p3?data.p3:''%>">
                    </div>

                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">岗位名称</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="p4"
                               value="<%=data.p4?data.p4:''%>">
                    </div>
                </div>
                <div class="border"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">增补类型</label>
                    <div class="col-sm-10">
                        <label>
                            <input type="radio" class="flat-red form-control" name="p2">
                            补足
                        </label>
                        <label>
                            <input type="radio" class="flat-red form-control" name="p2">
                            辞职补充
                        </label>
                        <label>
                            <input type="radio" class="flat-red form-control" name="p2">
                            编制调整
                        </label>
                        <label>
                            <input type="radio" class="flat-red form-control" name="p2">
                            短期需要
                        </label>
                        <label>
                            <input type="radio" class="flat-red form-control" name="p2">
                            扩大编制
                        </label>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">编制人数</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="p4"
                               value="<%=data.p4?data.p4:''%>">
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">岗位现有人数</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="p4"
                                   value="<%=data.p4?data.p4:''%>">
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">拟增加人数</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="p4"
                               value="<%=data.p4?data.p4:''%>">
                    </div>

                </div>

                <div class="form-group">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">增补类型</label>
                        <div class="col-sm-10">
                            <label>
                                <input type="radio" class="flat-red form-control" name="p2">
                                全职
                            </label>
                            <label>
                                <input type="radio" class="flat-red form-control" name="p2">
                                兼职
                            </label>
                            <label>
                                <input type="radio" class="flat-red form-control" name="p2">
                                实习
                            </label>
                            <label>
                                <input type="radio" class="flat-red form-control" name="p2">
                                返聘
                            </label>
                        </div>
                    </div>
                </div>

                <div class="border"></div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">到岗日期</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="p4"
                               value="<%=data.p4?data.p4:''%>">
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">薪酬范围</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="p4"
                                   value="<%=data.p4?data.p4:''%>">
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="u-box">
            <div class="u-box-header">
                <h3>岗位职责</h3>
            </div>
            <div class="u-area">
                <div class="form-group">
                    <label class="col-sm-2 control-label">申请原因</label>
                    <div class="col-sm-10">
                        <textarea type="text" class="form-control" name="p3">
                           <%=data.p3?data.p3:''%>
                        </textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">岗位职责</label>
                    <div class="col-sm-10">
                        <textarea type="text" class="form-control" name="p3">
                           <%=data.p3?data.p3:''%>
                        </textarea>
                    </div>
                </div>
            </div>
        </div>

        <div class="u-box">
            <div class="u-box-header">
                <h3>任职条件</h3>
            </div>
            <div class="u-area">
                <div class="form-group">
                    <label class="col-sm-2 control-label">性别</label>
                    <div class="col-sm-4">
                        <div class="btn-group" data-toggle="buttons">
                            <label class="btn btn-default <%=data.p1=='1' ? 'active' : ''%>" data-toggle-class="btn-primary" data-toggle-passive-class="btn-default">
                                <input type="radio" name="hasBranch" value="1" <%=data.p1=='0' ? 'checked' : ''%>> 男
                            </label>
                            <label class="btn btn-default <%=data.p1=='0' ? 'active' : ''%>" data-toggle-class="btn-primary" data-toggle-passive-class="btn-default">
                                <input type="radio" name="hasBranch" value="0" <%=data.p1=='1' ? 'checked' : ''%>> 女
                            </label>
                        </div>
                    </div>
                    <label class="col-sm-2 control-label">年龄</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="p4"
                               value="<%=data.p4?data.p4:''%>">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">教育程度</label>
                    <div class="col-sm-10">
                        <label>
                            <input type="radio" class="flat-red form-control" name="p2">
                            博士
                        </label>
                        <label>
                            <input type="radio" class="flat-red form-control" name="p2">
                            硕士
                        </label>
                        <label>
                            <input type="radio" class="flat-red form-control" name="p2">
                            本科
                        </label>
                        <label>
                            <input type="radio" class="flat-red form-control" name="p2">
                            大专
                        </label>
                        <label>
                            <input type="radio" class="flat-red form-control" name="p2">
                            高中
                        </label>
                        <label>
                            <input type="radio" class="flat-red form-control" name="p2">
                            初中
                        </label>
                        <label>
                            <input type="radio" class="flat-red form-control" name="p2">
                            小学
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">工作经历</label>
                    <div class="col-sm-10">
                        <textarea type="text" class="form-control" name="p3">
                           <%=data.p3?data.p3:''%>
                        </textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">业务技能</label>
                    <div class="col-sm-10">
                        <textarea type="text" class="form-control" name="p3">
                           <%=data.p3?data.p3:''%>
                        </textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">备注</label>
                    <div class="col-sm-10">
                        <textarea type="text" class="form-control" name="p3">
                           <%=data.p3?data.p3:''%>
                        </textarea>
                    </div>
                </div>
            </div>
        </div>

        <div class="u-box">
            <div class="u-box-header">
                <h3>部门经理审批</h3>
            </div>
            <div class="u-area">
                <div class="form-group">
                    <label class="col-sm-2 control-label">审批说明</label>
                    <div class="col-sm-10">
                        <textarea type="text" class="form-control" name="p3">
                           <%=data.p3?data.p3:''%>
                        </textarea>
                    </div>
                </div>
            </div>
        </div>

        <div class="u-box">
            <div class="u-box-header">
                <h3>人力资源经理审批</h3>
            </div>
            <div class="u-area">
                <div class="form-group">
                    <label class="col-sm-2 control-label">审批说明</label>
                    <div class="col-sm-10">
                        <textarea type="text" class="form-control" name="p3">
                           <%=data.p3?data.p3:''%>
                        </textarea>
                    </div>
                </div>
            </div>
        </div>

        <div class="u-box">
            <div class="u-box-header">
                <h3>总经理审批</h3>
            </div>
            <div class="u-area">
                <div class="form-group">
                    <label class="col-sm-2 control-label">审批说明</label>
                    <div class="col-sm-10">
                        <textarea type="text" class="form-control" name="p3">
                           <%=data.p3?data.p3:''%>
                        </textarea>
                    </div>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">
                <button type="submit" class="btn btn-danger pull-left">关闭</button>
            </label>
            <label class="col-sm-3 control-label">
            </label>
            <label class="col-sm-3 control-label">
            </label>
            <div class="col-sm-3">
                <select class="form-control" name="p9" u-action="submit">
                    <option>审批通过</option>
                    <option>打回</option>
                </select>
            </div>
        </div>
    </form>
</script>

<script>
    USEN(function () {
        //模块ID(全系统唯一)
        var tableId = "#rlzy_zhaopin";
        var id = "#rlzy_zhaopin_zong_confirm";

        //定义页面变量
        var $el = $(id);
        var $editor = $el.children('script[data-for=tp_editor]');

        $.ajax({
            url:"./simdata/common_modify_action.json",
            success:function(data){
                $el.children(".content").html(function(){
                    return _.template($editor.html())({
                        data:data
                    })
                });

                //提交表单
                $el.find('[u-action=submit]').on("change",function(){
                    //提交表单
                    $el.find("form").ajaxSubmit({
                        url: './simdata/common_modify_action.json',
                        beforeSubmit: function (data) {
                            //console.log("数据提交之前.")
                        },
                        success: function (data, state, obj) {
                            USEN.notifyAlert({
                                title: "提示:",
                                content: '操作成功,刷新列表'
                            });
                            USEN.getDatatable(tableId + ' table.table').ajax.reload();
                            USEN.closeActiveTab();
                        }
                    });
                });


                $el.find('.flat-red').iCheck({
                    checkboxClass: 'icheckbox_flat-green',
                    radioClass: 'iradio_flat-green'
                });

            }
        })

    });
</script>
</div>